package com.imooc.security.user;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @ClassName UserRepository
 * @Description TODO
 * @Author wushaopei
 * @Date 2020/10/15 23:10
 * @Version 1.0
 */
public interface UserRepository extends JpaSpecificationExecutor<User>,CrudRepository<User,Long> {

    List<User> findByName(String name);

    User findByUsername(@Param("username") String username);

    User findByUsernameAndPassword(String username, String password);
}
